package com.pkk.cloud.support.admin.mybatis.user;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pkk.cloud.support.admin.dto.req.user.OauthBindUserClientReqDto;
import com.pkk.cloud.support.admin.dto.req.user.OauthUserQueryPageReqDto;
import com.pkk.cloud.support.admin.dto.resp.user.OauthSysUserQueryPageRespDto;
import com.pkk.cloud.support.admin.entity.user.PenguinSysUser;
import java.util.HashMap;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface PenguinSysUserMapper extends BaseMapper<PenguinSysUser> {

  /**
   * @Description: 获取用户信息依据名称和客户端id
   * @return: com.pkk.cloud.support.admin.oauth.api.common.resp.PenguinSysUser
   * @Author: peikunkun
   * @Date: 2020/3/18 0018 下午 6:04
   */
  PenguinSysUser findPenguinUserByNameAndClientId(HashMap<String, String> param);

  /**
   * @Description: 获取系统用户分页列表
   * @Param: body
   * @return: java.util.List<com.pkk.cloud.support.admin.dto.resp.user.OauthSysUserQueryPageRespDto>
   * @Author: peikunkun
   * @Date: 2020/4/2 0002 上午 10:59
   */
  List<OauthSysUserQueryPageRespDto> findSysUserPageList(OauthUserQueryPageReqDto body);

  /**
   * @Description: 移除用户与访问客户单的绑定关系
   * @Param: userId
   * @return: int
   * @Author: peikunkun
   * @Date: 2020/4/8 下午10:07
   */
  int removeUserClientBind(Long userId);

  /**
   * @Description: 绑定用户与访问客户端的关系
   * @Param: body
   * @return: int
   * @Author: peikunkun
   * @Date: 2020/4/8 下午10:10
   */
  int bindUserClient(OauthBindUserClientReqDto body);
}